﻿// -----------------------------------------------------------------------
// <copyright file="Serializer.ICollectionHelper.cs" company="none">
// Copyright (c) 2012 M. Alberti, xanatos(at)live.it
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
// </copyright>
// -----------------------------------------------------------------------

namespace FluentSerializer
{
    using System;

    /// <summary>
    /// 
    /// </summary>
    public abstract partial class Serializer
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="serializer"></param>
        /// <param name="parametersType"></param>
        /// <param name="type"></param>
        /// <param name="helper"></param>
        /// <returns></returns>
        protected static Descriptor ICollectionHelper(Serializer serializer, Type parametersType, Type type, Type helper)
        {
            Type subType = type.GetGenericArguments()[0];
            helper = type.GetGenericTypeDefinition();

            Descriptor descriptor = Serializer.GetSerializer(serializer, subType, subType, helper);
            return descriptor;
        }
    }
}